﻿using System.Drawing;
using System.Workflow.ComponentModel;
using System.Workflow.ComponentModel.Design;


namespace WorkflowLibrary
{
    /// <summary>
    /// Klasa designera dla aktywności indykującej koniec procesu
    /// </summary>
    class StopProcessActivityDesigner : ActivityDesigner
    {
        StopProcessActivity _activity;
        protected override void Initialize(Activity activity)
        {
            _activity = activity as StopProcessActivity;
            base.Initialize(activity);
        }
        protected override Size OnLayoutSize(ActivityDesignerLayoutEventArgs e)
        {
            return new Size(15, 15);
        }

        protected override void OnPaint(ActivityDesignerPaintEventArgs e)
        {
            e.Graphics.FillRectangle(Brushes.Black,
            Location.X+Size.Width/2 - 10, Location.Y+Size.Height/2 - 10,
            20, 20);
        }
	}
}
